bigdb-sample-cli

#!/usr/bin/env php
<?php 
/**  
 * BigDb CLI. UNDER DEVELOPMENT
 *  
 *  @TODO add support for multiple BigDb apps. Primary intended use is for USERS of BigDb Apps. This would mean loading all BigDb apps inside vendor/, assuming composer usage.
 *  @TODO add object calling (i.e. run a query, load result into orm, then call a method on the orm object)
 */  

$own_autoloader = dirname(__DIR__).'/vendor/autoload.php';
$their_autoloader = dirname(__DIR__, 3).'/autoload.php';
if (file_exists($their_autoloader)){
    require($their_autoloader);
} else if (file_exists($own_autoloader)){
    require($own_autoloader);
} else {
    echo "\nCan't load composer autoload.php\n\n";
    return;
}


$cli = new \Tlf\BigDb\LibraryCli();
$cli->exclude_from_help[] = 'main';
$cli->exclude_from_help[] = 'help';

// CHANGE THIS TO CHANGE CONFIG LOCATION
// and be SURE to add it to gitignore
$cli->args['config_location'] = 'CONFIG_FILE_LOCATION';

$cli->load_stdin();  

$cli->init();
  
$cli->execute();